﻿@inject ICachedDataService dataService
@inject IImageCacheService cacheService
@inject IUserStatusService statusService
<div>
    <button class="btn btn-primary" @onclick="RefreshCache" type="button">Clear and Refresh the Damselfly Cache</button>
</div>

@code{

    async Task RefreshCache()
    {
        await cacheService.ClearCache();
        await dataService.ClearCache();

        statusService.UpdateStatus("Cache cleared.");
    }

}